package org.jeecg.modules.lab.util;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**

利用拦截器将本机地址映射成url路径

*/

@Configuration
public class FilePathConfig implements WebMvcConfigurer {
        @Override
        public void addResourceHandlers(ResourceHandlerRegistry registry) {
                registry.addResourceHandler("/tempImages/**") //虚拟url路径
                .addResourceLocations("file:///D:/zhuiExperiment/picture/"); //真实本地路径
               /* registry.addResourceHandler("/tempReport/**") //虚拟url路径
                        .addResourceLocations("file:///D:/zhuiExperiment/picture/");*/
        }
}
